import os from "os";

export default function () {

  const interfaces = os.networkInterfaces();

  for (const name in interfaces) {

    const items = interfaces[name];

    for (const item of items) {
      if (item.family === 'IPv4' && !item.internal && item.address !== '127.0.0.1') {
        return item.address;
      }
    }
    
  }

}